package com.weiyin.examination.module;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * 绘制五线谱以上或者以下的线
 *
 * @author njf
 * @date 2017/11/7
 */

public class CourseDrawLineModule implements Parcelable {
    private float startX;
    private float startY;
    private float stopX;
    private float stopY;

    public CourseDrawLineModule() {

    }

    public CourseDrawLineModule(float startX, float startY, float stopX, float stopY) {
        this.startX = startX;
        this.startY = startY;
        this.stopX = stopX;
        this.stopY = stopY;
    }

    protected CourseDrawLineModule(Parcel in) {
        startX = in.readFloat();
        startY = in.readFloat();
        stopX = in.readFloat();
        stopY = in.readFloat();
    }

    public static final Creator<CourseDrawLineModule> CREATOR = new Creator<CourseDrawLineModule>() {
        @Override
        public CourseDrawLineModule createFromParcel(Parcel in) {
            return new CourseDrawLineModule(in);
        }

        @Override
        public CourseDrawLineModule[] newArray(int size) {
            return new CourseDrawLineModule[size];
        }
    };

    public float getStartX() {
        return startX;
    }

    public void setStartX(float startX) {
        this.startX = startX;
    }

    public float getStartY() {
        return startY;
    }

    public void setStartY(float startY) {
        this.startY = startY;
    }

    public float getStopX() {
        return stopX;
    }

    public void setStopX(float stopX) {
        this.stopX = stopX;
    }

    public float getStopY() {
        return stopY;
    }

    public void setStopY(float stopY) {
        this.stopY = stopY;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeFloat(startX);
        dest.writeFloat(startY);
        dest.writeFloat(stopX);
        dest.writeFloat(stopY);
    }
}
